The invention relates to a new process for preparing the (E)-N-methyl-N-(1-naphthylmethyl)-6,6-dimethylhept-2-ene-4-ynyl-1-amine of formula (I) and the acid addition salts thereof. 
The compound of formula (I)xe2x80x94international nonproprietary (INN) name: terbinafinexe2x80x94was first disclosed in the European Patent Specification No. 24587 (priority: 22.08.1979) as a good antifungal agent used preferably against mycosis caused by dermathophytons on the skin and on the nail. Example 16 of this patent specification describes the specific compound and mentions that it is a trans isomer. According to the patent specification the terbinafine was prepared in three different chemical ways. It can be seen from the specification that the compound was always obtained in base formxe2x80x94namely as the mixture of cis(Z) and trans(E) isomers. The separation was achieved by column chromatography which is a procedure preferably not employed in an industrial large scale production.
In a later publication (see J. Med. Chem. 27, 1539-1543 (1984)) the hydrochloride salt of the trans isomer was obtained from the mixture of the base by way of column chromatography on silica-gel, and salt formation with hydrochloric acid in ethanol followed by re-crystallization. After the success of terbinafine on the market more processes were published. Thus the process described in Swiss Patent Specification No. 678 537 or in its Hungarian equivalent Pat. No. 209 284 used as starting material the hydrochloride salt of N-methyl-1-naphthalenemethylamine of formula (II) and the geometric isomeric (E:Z) mixture of 3:1 of 1-bromo-6,6-dimethyl-hept-2-ene-4-yne of formula (IIIa). 
The essence of the procedure is that the secondary amine was alkylated with the bromo-compound of formula (IIIa),xe2x80x94a crude product and mixture of geometric isomersxe2x80x94in the presence of aqueous sodium-hydroxide. The terbinafine base was formed as the mixture of trans- and cis-isomers in form of an oily substance. The crude terbinafine (still a mixture of isomers) was obtained by extraction with toluene and by evaporation of toluene, and had the same ratio of isomers as the compound of formula (IIIa). The crude terbinafine was then dissolved in ethyl acetate and hydrochloric acid gas was introduced into the solution. After stirring for a long time (4-15 hours) the precipitated hydrochloride salt of trans-terbinafine product of formula (I) was centrifuged, washed with ethyl acetate and dried.
The disadvantages of the process are the necessity to work with the offensive and unstable bromo-compound of formula (IIIa) and with the poisonous, aromatic solvent (extraction and evaporation of toluene), and that the preparation of the hydrochloride salt of terbinafine product requires dry hydrochloric acid gas and anhydrous ethyl acetate as solvent.
The compound of formula (IIIb) is an analogue of the known bromo-compound of formula (IIIa) (see European Patent Specification No. 341 048). It was prepared from known 3-hydroxy-6,6-dimethyl-hept-1-ene-4-yne of formula (IV), but no characteristic data of the chloro-compound of formula (IIIb) were described. (IIIb) was reacted directly, in form of a residue obtained by evaporation, with N-hydroxy-phthalimide. It is important to note that the chloro-compound of formula (IIIb) was not described elsewhere in the literature. 
A different synthetic principle was applied in the preparation of terbinafine described in the Canadian Patent Specification No. 2 185 599. Here the epoxide of formula (V) was obtained from the secondary amine of formula (II) with an excess of epichlorohydrin, and (V) was converted into the secondary alcohol of formula (VI). Dehydration of the secondary alcohol of formula (VI) yielded a mostly undefined geometric isomeric mixture of (I). 
According to another process, the aldehyde derivative of formula (VII), obtained from the secondary amine of formula (II), was reacted with the phosphorus-compounds of formula (VIII) in a Wittig-type reaction. This process also resulted in an undefined isomeric mixture of the compound (I). 
The two processes above have several disadvantages:
a large excess of reagents (epichlorohydrin, 3,3-dimethyl-butyne) were required;
occasionally, undefined amounts and ratios of reagents were used;
complicated isolations by column chromatography were necessary;
the product was obtained in form of a very disadvantageous (and eventually undefined) geometric isomeric mixture (E:Z 1:9xe2x86x9211).
The object of this invention is a process which does not have the disadvantages of the known processes and which is applicable for large scale production.
During our experiments it was surprisingly found that the acid addition salt of terbinafine may be prepared, without isolating the base form of compound of formula (I), by reacting the known secondary amine of formula (II) and the secondary alcohol of formula (IV) in a specific solvent.
This observation led to further unexpected results:
a) Reaction of the secondary alcohol of formula (IV) and cc. hydrochloric acid yields the chloro-derivative of formula (IIIb) quantitatively, whereas, in accordance with the procedure disclosed in the European Patent Specification No. 341 048 which employs thionyl chloride, this compound could only be obtained in a crude yield of 88%.
b) The quantitative formation of the compound of formula (IIIb) is surprising because the aqueous hydrogen chloride which is used for the preparation of (IIIb) is less reactive than the hydrobromic acid which is used for the preparation of the compound of formula (IIIa).
c) In the reaction with HCl instead of HBr, the less space requiring Cl-atom attaches to the end of the molecule. The trans:cis isomeric ratio obtained is not getting worse at all, it is even a little better (3:1xe2x86x923.4:1).
d) It is also surprising that the reactivity of the chloro-compound of formula (IIIb) is similar, or even a little better than, the reactivity of the known bromo-analogue. Namely, the alkylation of the amine of formula (II) generated the product of formula (I) in a good yield.
e) The use of aliphatic ketones as a type of solvent gave an unexpected and surprising result. This solvent type is excellent for the extraction of the alkylating agent of formula (IIIb) and proved to be an effective solvent for the preparation of the compound of formula (I). Furthermore, when an aliphatic ketone, especially methyl isobutyl ketone, is used as a solvent, the hydrochloride salt of the end-product surprisingly precipitates after acidification with hydrogen chloride while the undesired hydrochloride salt of the cis-isomer and the other chemical impurities of the end-product remain in the solution and can be removed easily.
Table 1 summarizes the cis-isomer content of end-products obtained in different solvents. The results demonstrate that our surprising recognition, namely the advantageous use of an aliphatic ketone, especially methyl isobutyl ketone, afforded an especially low percentage of cis-isomer impurity.
Terbinafine base as a mixture of isomers of 75 w % trans and 25 w % cis was used as starting material.
Therefore, on the basis of the above goals, the invention is a new process for the preparation of the amine of formula (I) and acid addition salts thereof. This may be carried out as follows: the chloro-compound of formula (IIIb)xe2x80x94containing the E and Z isomers in a weight-ratio of 3.3-3.4:1xe2x80x94is prepared by reacting the secondary alcohol of formula (IV) with hydrogen chloride in a solvent. Then (IIIb) is reacted with the secondary amine of formula (II) in an aliphatic ketone-type solvent in the presence of a base and optionally a iodide salt catalyst. The compound of formula (I) is obtained in base form and in an isomeric ratio of 3.3-3.4:1. The base is converted directly into the hydrochloride salt by adding aqueous hydrogen chloride. The E-isomer-hydrochloride precipitates and is separated. Optionally the base can be liberated and can be convertedxe2x80x94in a known wayxe2x80x94into an acid addition salt with another pharmaceutically acceptable acid.
In a preferable embodiment of the process according to the invention 3-7 mole of the secondary alcohol of formula (IV) are reacted with preferably 5.0-5.5 mole, preferably ice cooled, cc. hydrochloric acid. Conveniently, the reaction mixture is stirred overnight.
The chloro-compound of formula (IIIb) is obtained as a geometric isomeric mixturexe2x80x94the weight-ratio of trans:cis (E:Z) is 3.3-3.4:1-, and is extracted with an aliphatic ketone-type solvent, preferably methyl isobutyl ketone. Then the chloro-compound of formula (IIIb) extract is diluted with methyl isobutyl ketone and is reacted with the amine of formula (II). This alkylation reaction is carried out in the presence of an amine-base at 20-80xc2x0 C. for 1-16 hours, preferably in the presence of equimolar N,N-diisopropylethylamine and 5-7 mole % iodide-salt catalyst for 3-5 hours.
The base form of the compound of formula (I) is obtained in solution in the phase of methyl isobutyl ketone, and is converted into a hydrogen-chloride salt by adding aqueous hydrochloric acid. The pH of the mixed two-phase system is adjusted to 1.0-3.0, preferably to 1.5-2.0. Then the two-phase system is cooled with stirring. The precipitated solid is filtered off, washed with water and with methyl isobutyl ketone and dried. The obtained hydrochloride saltxe2x80x94containing the desired E isomerxe2x80x94is treated with a base, e.g. ammonium-hydroxide, under mild conditions.
The base of formula (I) obtained this way is converted into an acid addition salt by treatment with a pharmaceutically acceptable acid.
One of the starting materials of the process according to our invention, the secondary alcohol of formula (IV), is a known compound. This compound may be prepared e.g. according to the EP 24 587 Patent Specification using 3,3-dimethyl-1-butyne and acrolein. (See J. Med. Chem. 27, 1539-42 (1984))
The other starting material of the process according to our inventionxe2x80x94the secondary amine of formula (II)xe2x80x94was described as a hydrochloride salt in Beilstein 12, II. 740, III. 3097, and IV. 2192.
Summarized, the process according to our invention has the following advantages:
1) The secondary alcohol of formula (IV) is converted into the alkylating chloro-compound of formula (IIIb) in a simple way by using cc. aqueous hydrogen chloride.
2) The compound of formula (IIIb) is obtained quantitatively from the reaction mixture by a single extraction with aliphatic ketone and can be reacted further in the same medium. The hydrochloride of the end-product of formula (I) simply precipitates from the aqueous-ketone, two-phase reaction mixture in the final acidification with hydrochloric acid.
3) The ketone, preferably methyl isobutyl ketone, used by us in the reaction steps has three functions in the process: it is an extracting agent, a solvent and finally a cosolvent, keeping the apolar, hardly water soluble impurities of the end-product in solution.
4) Compared to the processes of the prior art, our process is simple and suitable for large scale operations. The secondary alcohol of formula (IV) may be added to the apparatus and the hydrochloride of the compound of formula (I)xe2x80x94as the pure (E) trans isomerxe2x80x94is obtained at the end of the process.
5) While the processes of the prior art use hydrochloric acid gas for converting compound of formula (I), our process uses the more suitable aqueous hydrochloric acid.
6) In our process the hydrochloride salt of the end-product precipitates from a heterogeneous, two-phase (upper ketone, lower acid-aqueous) system. This provides for the high purity of the product obtained by the process according to the invention. The total impurity of the product (see Example 1, where it is 0.19%) is less, than the level of impurity obtained in the processes of the prior art (0.3%). Moreover the end-product does not containxe2x80x94because it can notxe2x80x94bromide impurity.
7) Our process does not require expensive, anhydrous solvents.